DATABASE & SQL/PLSQL

adplus-dvertising
Oacle interview Questions And Answer
Previous Home Next
What are disadvantages of having raw devices?

We should depend on export/import utility for backup/recovery (fully reliable) The tar command cannot be used for physical file backup, instead we can use dd command, which is less flexible and has limited recoveries.

List the factors that can affect the accuracy of the estimations?

  • The space used transaction entries and deleted records, does not become free immediately after completion due to delayed cleanout.
  • Trailing nulls and length bytes are not stored.
  • Inserts of, updates to and deletes of rows as well as columns larger than a single data block, can cause fragmentation a chained row pieces.
Database Security & Administration

What is user Account in Oracle database?

A user account is not a physical structure in database but it is having important relationship to the objects in the database and will be having certain privileges.

How will you enforce security using stored procedures?

Don't grant user access directly to tables within the application. Instead grant the ability to access the procedures that access the tables. When procedure executed it will execute the privilege of procedures owner. Users cannot access tables except via the procedure.

What are the dictionary tables used to monitor a database space?

  • DBA_FREE_SPACE
  • DBA_SEGMENTS
  • DBA_DATA_FILES.
SQL*Plus Statements

What are the types of SQL statement?

  • Data Definition Language: CREATE, ALTER, DROP, TRUNCATE, REVOKE, NO AUDIT & COMMIT.
  • Data Manipulation Language: INSERT, UPDATE, DELETE, LOCK TABLE, EXPLAIN PLAN & SELECT.
  • Transactional Control: COMMIT & ROLLBACK
  • Session Control: ALTERSESSION & SET ROLE
  • System Control:ALTER SYSTEM.

What is a transaction?

Transaction is logical unit between two commits and commit and rollback.

What is difference between TRUNCATE & DELETE?

  • TRUNCATE commits after deleting entire table i.e., cannot be rolled back. Database triggers do not fire on TRUNCATE
  • DELETE allows the filtered deletion. Deleted records can be rolled back or committed.
  • Database triggers fire on DELETE.
What is a join? Explain the different types of joins?

Join is a query, which retrieves related columns or rows from multiple tables.

  • Self Join: Joining the table with itself.
  • Equi Join: Joining two tables by equating two common columns.
  • Non-Equi Join: Joining two tables by equating two common columns.
  • Outer Join: Joining two tables in such a way that query can also retrieve rows that do not have corresponding join value in the other table.

What is the sub-query?

Sub-query is a query whose return values are used in filtering conditions of the main query.

What is correlated sub-query?

Correlated sub-query is a sub-query, which has reference to the main query.

Explain CONNECT BY PRIOR?

Retrieves rows in hierarchical order eg. select empno, ename from emp where.

Previous Home Next